Currently, hierarchical data structure container formats are a prevalent type of encoding and storage method for a collection of components where each component (e.g., a “key” or “tag”) has an associated identifier name. These components may be comprised of data or other components which thereby creates a hierarchy of components as each component can contain other components. If a component is comprised of another component, it is referred to as a “container.” Extensible Markup Language (XML) and Final Cut Pro Dictionary System (FCPDS) are two examples of popular hierarchical data structure container formats. A hierarchical data structure container format is a combination of a general container format (encoding method) and a term describing the structure in the general container format. For example, Extensible Markup Language (XML) is a general container format having several different structures, such as XTL and XTF.
Various hierarchical data structure container formats have incompatibilities in the way data is represented and structured. For example, XML, has certain capabilities that FCPDS does not have and vice versa. To illustrate, in XML, data is defined using keys where a key can have only data or can have children keys. Within the same key or “scope,” there can exist multiple children keys having the same key name. In FCPDS, data is also defined using keys where a key can have only data (a value such as a string, number, etc.) or can have children keys. In FCPDS, however, each key name is indexed by a hash table. Therefore, two keys can not have the same name within the same key or scope since both key names would have the same index value in the hash table. As such, in XML, there can be multiple keys having the same name at the same level in a data structure, whereas in FCPDS this can not occur.
As such, an application configured to process data formatted in one hierarchical data structure container format may not be able to process data formatted in another hierarchical data structure container format due to the incompatibilities in the way data is represented and structured between the two formats. Therefore, there is a need for a method that translates a data structure formatted in a first container format to a data structure formatted in a second different container format (e.g., from XML to FCPDS or vice versa).
Also, even if it is not desired to translate the container format of a data structure to a different container format (e.g., from XML to FCPDS or vice versa), a programmer may wish to change the structure and/or content of the data structure according to certain desired requirements. As such, there also a need for a method that converts a first data structure to a second data structure according to predefined requirements, the two data structures having the same container format.